package com.ruoyi.myRocketMQ;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "consumer_group",topic = "topic")
public class MyRocketMQ implements RocketMQListener {

    @Override
    public void onMessage(Object o) {
        System.err.println("消息是："+o);
    }
}
